Skip to content

Revert "Use sizeof more pervasively" #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2017
Merged

Revert "Use sizeof more pervasively" #247

merged 1 commit into from
May 19, 2017

Conversation

das
Copy link
Contributor

@das das commented May 19, 2017

Reverts #242

breaks the build on Darwin with

In file included from libdispatch/src/allocator.c:22:
libdispatch/src/allocator_internal.h:240:5: error: function-like macro 'sizeof' is not defined
#if SUPERMAPS_TO_MAPS_PADDING > 0
    ^
libdispatch/src/allocator_internal.h:168:3: note: expanded from macro 'SUPERMAPS_TO_MAPS_PADDING'
                SIZEOF_SUPERMAPS + HEADER_TO_SUPERMAPS_PADDING + SIZEOF_HEADER))
                ^
libdispatch/src/allocator_internal.h:159:27: note: expanded from macro 'SIZEOF_SUPERMAPS'
#define SIZEOF_SUPERMAPS (BYTES_PER_SUPERMAP * SUPERMAPS_PER_MAGAZINE)
                          ^
libdispatch/src/allocator_internal.h:125:28: note: expanded from macro 'BYTES_PER_SUPERMAP'
#define BYTES_PER_SUPERMAP sizeof(bitmap_t)
                           ^
libdispatch/src/allocator_internal.h:248:5: error: function-like macro 'sizeof' is not defined
#if MAPS_TO_FPMAPS_PADDING > 0
    ^
libdispatch/src/allocator_internal.h:170:62: note: expanded from macro 'MAPS_TO_FPMAPS_PADDING'
#define MAPS_TO_FPMAPS_PADDING (PADDING_TO_CONTINUATION_SIZE(SIZEOF_MAPS))
                                                             ^
libdispatch/src/allocator_internal.h:160:22: note: expanded from macro 'SIZEOF_MAPS'
#define SIZEOF_MAPS (BYTES_PER_BITMAP * BITMAPS_PER_SUPERMAP * \
                     ^
libdispatch/src/allocator_internal.h:111:26: note: expanded from macro 'BYTES_PER_BITMAP'
#define BYTES_PER_BITMAP sizeof(bitmap_t)
                         ^
libdispatch/src/allocator_internal.h:258:5: error: function-like macro 'sizeof' is not defined
#if FPMAPS_TO_FPCONTS_PADDING > 0
    ^
libdispatch/src/allocator_internal.h:193:3: note: expanded from macro 'FPMAPS_TO_FPCONTS_PADDING'
                BYTES_PER_BITMAP * BITMAPS_IN_FIRST_PAGE))
                ^
libdispatch/src/allocator_internal.h:111:26: note: expanded from macro 'BYTES_PER_BITMAP'
#define BYTES_PER_BITMAP sizeof(bitmap_t)
                         ^
libdispatch/src/allocator_internal.h:278:5: error: function-like macro 'sizeof' is not defined
#if AFTER_CONTS_PADDING > 0
    ^
libdispatch/src/allocator_internal.h:202:33: note: expanded from macro 'AFTER_CONTS_PADDING'
                (DISPATCH_CONTINUATION_SIZE * CONTINUATIONS_PER_MAGAZINE)))
                                              ^
libdispatch/src/allocator_internal.h:140:4: note: expanded from macro 'CONTINUATIONS_PER_MAGAZINE'
                (BITMAPS_PER_MAGAZINE * CONTINUATIONS_PER_BITMAP)
                 ^
libdispatch/src/allocator_internal.h:138:31: note: expanded from macro 'BITMAPS_PER_MAGAZINE'
#define BITMAPS_PER_MAGAZINE (SUPERMAPS_PER_MAGAZINE * BITMAPS_PER_SUPERMAP)
                              ^
libdispatch/src/allocator_internal.h:137:3: note: expanded from macro 'SUPERMAPS_PER_MAGAZINE'
                CONSUMED_BYTES_PER_SUPERMAP)
                ^
libdispatch/src/allocator_internal.h:126:38: note: expanded from macro 'CONSUMED_BYTES_PER_SUPERMAP'
#define CONSUMED_BYTES_PER_SUPERMAP (BYTES_PER_SUPERMAP + \
                                     ^
libdispatch/src/allocator_internal.h:125:28: note: expanded from macro 'BYTES_PER_SUPERMAP'
#define BYTES_PER_SUPERMAP sizeof(bitmap_t)
                           ^

@das das merged commit e85f5ee into master May 19, 2017
@das das deleted the revert-242-sizeof branch May 25, 2017 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants